package com.luoxue.execsql.rest.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.luoxue.execsql.common.util.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * sys_common_validator
 *
 * @author
 */
@Data
@NoArgsConstructor
@TableName("sys_common_validator")
public class CommonValidator extends BaseEntity implements Serializable {
    /**
     * 主键id
     */
//    private Long id;

    /**
     * 规则名称
     */
    private String ruleName;

    /**
     * 正则类型
     */
    private String regexType;

    /**
     * 正则文本
     */
    private String regexText;

    /**
     * 正则验证错误信息
     */
    private String errorMsg;


    private static final long serialVersionUID = 1L;

    @TableField(exist=false)
    private String paramName;

    public CommonValidator(String paramName, String regexType, String errorMsg) {
        this.paramName = paramName;
        this.regexType = regexType;
        this.errorMsg = errorMsg;
    }
}
